﻿using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using WPControla.Client.Services;
using WPControla.Client.ViewModels;
using WPControla.Client.Services.Rss;
using WPControla.Client.Services.Podcast;

namespace WPControla.Client.Test.ViewModels
{
    [TestClass]
    public class VMViewChapterTest
    {
        Mock<IAudioService> audioService = new Mock<IAudioService>(MockBehavior.Strict);

        /// <summary>
        /// Initialize viewmodel with mock objects.
        /// </summary>
        /// <returns></returns>
        private IVMViewChapter InitializeViewModel()
        {
            return new VMViewChapter(audioService.Object);
        }

        [TestMethod]
        public void GetSetItemTest()
        {
            IVMViewChapter target = InitializeViewModel();

            Entities.PodcastItem item = new Entities.PodcastItem() { id = 1, Title = "test"};

            target.Item = item;

            Assert.AreEqual(item, target.Item);
        }
    }
}
